<!--  -->
<template>
  <div>
      <h2>标签自定义属性</h2>
      <div data-mysetdata='mysetdata-content' @click='mysetdata_click($event)'>
          标签自定义属性
      </div>
      <div id='html-content'>
        <div v-html='html_data'></div>
      </div>
  </div>
</template>

<script>
export default {
  data () {
    return {
      html_data:'<div data-mysetdata="mysetdata-content">v-html渲染内容</div>'
    };
  },

  components: {},

  computed: {},

  mounted(){
    let html_dom = document.getElementById('html-content')
    html_dom.addEventListener('click',(e)=>{
      console.log(e,'v-html渲染内容点击事件触发')
    })
  },

  methods: {
      mysetdata_click(e){
          console.log(e,e.target,e.target.dataset["mysetdata"])
      }
  }
}

</script>
<style lang='scss' scoped>
</style>